pkg_name=procmail
version=3.22
src_dir=$src_dir_root/$pkg_name-$version
#we use a mirror as the home site seems down for download
url=ftp://ftp.fu-berlin.de/pub/unix/mail/$pkg_name/$pkg_name-$version.tar.gz

cd "$src_dir_root"
rm -Rf "$pkg_name-$version"
tar zxf "$pkg_name-$version.tar.gz"

cd "$src_dir"

#get rid of the getline conflict
find -type f -name '*.[ch]' | xargs sed -i 's/getline/get_line/' 

make bins LOCKINGTEST=/

install_tmp_dir=/tmp/$pkg_name-$version
rm -Rf "$install_tmp_dir"
mkdir -p "$install_tmp_dir"
make install.bin "BASENAME=$install_tmp_dir"

install_dirs "$builders_dir_root/$pkg_name/runtime.dirs"
install_files "$builders_dir_root/$pkg_name/runtime.files" "$install_tmp_dir"
elf_strip "$builders_dir_root/$pkg_name/elf-strip"

rm -Rf "$install_tmp_dir"
rm -Rf "$src_dir"
